import request from "@/utils/request"

const project = {
  // 新增项目基本信息
  delete(id) {
    return request.post(`/kjsf/project/delete/${id}`)
  }, list(params) {
    return request.get("/kjsf/project/list", {params})
  },
  // 项目基本信息详情
  get(id) {
    return request.get(`/kjsf/project/detail/${id}`)
  },
  getAll(id) {
    return request.get(`/kjsf/project/allDetail/${id}`);
  },

  // 申报列表
  declareList(params) {
    return request.get("/kjsf/project/declareList", {params})
  },

  // 1.2.2.我的申报列表
  myDeclareList(params) {
    return request.get("/kjsf/project/myDeclareList", {params})
  },

  // 1.3.1.实施列表
  implementList(params) {
    return request.get("/kjsf/project/implementList", {params})
  },

  // 1.3.2.我的实施列表
  myImplementList(params) {
    return request.get("/kjsf/project/myImplementList", {params})
  },

  myList(params) {
    return request.get("/kjsf/project/myList", {params})
  },


  // 新增项目基本信息
  add(data) {
    return request.post("/kjsf/project/add", data)
  },
  // 修改项目基本信息
  update(data) {
    return request.post("/kjsf/project/update", data)
  },

  // 新增实施背景及必要性
  projectBackgroundAdd(data) {
    return request.post("/kjsf/projectBackground/add", data)
  },
  // 修改实施背景及必要性
  projectBackgrounUpdate(data) {
    return request.post("/kjsf/projectBackground/update", data)
  },
  // 1.2.7.实施背景及必要性详情
  projectBackgroundDetail(id) {
    return request.get(`/kjsf/projectBackground/detail/${id}`)
  },
  // 1.2.8.根据项目id获取实施背景及必要性详情
  projectBackgroundDetailGetByProjectId(projectId) {
    return request.get(`/kjsf/projectBackground/getByProjectId/${projectId}`)
  },


  // 1.2.9.新增依托工程（项目）概述
  projectOverviewAdd(data) {
    return request.post("/kjsf/projectOverview/add", data)
  },
  // 1.2.10.修改依托工程（项目）概述
  projectOverviewUpdate(data) {
    return request.post("/kjsf/projectOverview/update", data)
  },
  // 1.2.11.依托工程（项目）概述详情
  projectOverviewDetail(id) {
    return request.get(`/kjsf/projectOverview/detail/${id}`)
  },
  // 1.2.12.根据项目id获取依托工程（项目）概述详情
  projectOverviewDetailGetByProjectId(projectId) {
    return request.get(`/kjsf/projectOverview/getByProjectId/${projectId}`)
  },


  // 新增前期工作和科研基础
  projectWorkBasisAdd(data) {
    return request.post("/kjsf/projectWorkBasis/add", data)
  },
  // 修改前期工作和科研基础
  projectWorkBasisUpdate(data) {
    return request.post("/kjsf/projectWorkBasis/update", data)
  },
  // 1.2.15.前期工作和科研基础详情
  projectWorkBasisDetail(id) {
    return request.get(`/kjsf/projectWorkBasis/detail/${id}`)
  },
  // 1.2.12.根据项目id获取依托工程（项目）概述详情
  projectWorkBasisDetailGetByProjectId(projectId) {
    return request.get(`/kjsf/projectWorkBasis/getByProjectId/${projectId}`)
  },

  // 新增推广技术的主要内容与规模
  projectContentScaleAdd(data) {
    return request.post("/kjsf/projectContentScale/add", data)
  },
  // 修改推广技术的主要内容与规模
  projectContentScaleUpdate(data) {
    return request.post("/kjsf/projectContentScale/update", data)
  },
  // 根据id获取推广技术的主要内容与规模详情
  projectContentScaleDetail(id) {
    return request.get(`/kjsf/projectContentScale/detail/${id}`)
  },
  // 1.2.20.根据项目id获取推广技术的主要内容与规模详情
  projectContentScaleDetailGetByProjectId(projectId) {
    return request.get(`/kjsf/projectContentScale/getByProjectId/${projectId}`)
  },
  // 1.2.20.根据项目id获取推广技术的主要内容与规模详情
  PlanDetailGetByProjectIdAndPhaseType(projectId, phaseType) {
    return request.get(`/kjsf/projectResearchPlan/getByProjectId/${projectId}/${phaseType}`)
  },


  // 1.2.21.新增（修改）预期成果及表达形式
  projectExpectResultsAddOrUpdate(data) {
    return request.post("/kjsf/projectExpectResults/addList", data)
  },
  // 1.2.20.根据项目id获取推广技术的主要内容与规模详情
  projectExpectResultsDetailGetByProjectId(projectId) {
    return request.get(`/kjsf/projectExpectResults/getByProjectId/${projectId}`)
  },


  // 新增（修改）项目单位
  projectCompanyAddOrUpdate(data) {
    return request.post("/kjsf/projectCompany/addList", data)
  },
  submit(data) {
    return request.post('/kjsf/project/submit', data);
  },
  // 根据项目id和阶段类型获取项目单位信息
  projectCompanyDetailGetByProjectId(projectId, phaseType) {
    return request.get(`/kjsf/projectCompany/getByProjectId/${projectId}/${phaseType}`)
  },
  // 根据id获取所有报审审批记录
  getByBusinessId(reportTrialId) {
    return request.get(`/kjsf/approve/getByBusinessId/${reportTrialId}`);
  },
  projectExpectResultsGetByProjectIdAndPhaseType(projectId, phaseType) {
    return request.get(`/kjsf/projectExpectResults/getByProjectIdAndPhaseType/${projectId}/${phaseType}`);
  },
  projectMainContentAdd(data) {
    return request.post("/kjsf/projectMainContent/add", data)
  },

  projectMainContentUpdate(data) {
    return request.post("/kjsf/projectMainContent/update", data)
  },
  projectMainContentGetByProjectId(projectId) {
    return request.get(`/kjsf/projectMainContent/getByProjectId/${projectId}`)
  },
  projectGoalAdd(data) {
    return request.post("/kjsf/projectGoal/add", data)
  },
  projectGoalUpdate(data) {
    return request.post("/kjsf/projectGoal/update", data)
  },
  projectGoalGetByProjectId(projectId) {
    return request.get(`/kjsf/projectGoal/getByProjectId/${projectId}`)
  },
  projectPDF(id){
    return request.post(`/kjsf/project/createPdfByWindows/${id}`,{},{});
  },
  myJoinList(params){
    return request.get('/kjsf/project/myJoinList', {params})
  },
  getZJZZPZ(){
    return request.get(`/kjsf/projectReviewTeam/getZJZZPZ`);
  },
  getTeamByBusinessId(businessId){
    return request.get(`/kjsf/projectReviewTeam/getTeamByBusinessId/${businessId}`);
  },
  createZjBankPdfByWindows(teamId){
    return request.post(`/kjsf/expertsReviewTeam/createZjBankPdfByWindows/${teamId}`);
  },
  reviewTeamUpdate(data) {
    return request.post('/kjsf/reviewTeam/update', data);
  },
  updateInfo(data) {
    return request.post('/kjsf/projectReviewTeam/updateInfo', data);
  },
}
export default project
